package cn.com.demo.microservice.provider.controller;

import cn.com.demo.microservice.entity.User;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/provider")
public class DemoController {
    @GetMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name){
        return "hello," + name;
    }
    @PostMapping("/user")
    public User user(@RequestBody User user){
        user.setUrId(100);
        return user;
    }
}
